package com.projectfixit.entity;

import org.apache.commons.lang.StringUtils;


public class ContentError {


	private String type;
	private String value;
	
	public ContentError(String type, String value){
		this.type = type;
		this.value = value;
	}
	
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	@Override
	public boolean equals(Object content) {
	
		if (this == content) {
			  return true;
		}else if (!(content instanceof ContentError)){
		      return false;

		}
		ContentError contentError = (ContentError) content;
		    return ((StringUtils.equals(value, contentError.value) ) &&  
		     ((type == null)  ? contentError.type == null : StringUtils.equals(type, contentError.type)));
	}
	
	@Override
	public int hashCode() {

		int hashValue = 7;
		hashValue = hashValue * 31 + (value == null ? 0 : value.hashCode());
		hashValue = hashValue * 31 + (type == null ? 0 : type.hashCode());
		return hashValue;
	}
	


}
